import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}

export function resgiter(data) {
  return request({
    url: '/user/add',
    method: 'post',
    data
  })
}

export function updateUser(data) {
  return request({
    url: '/user/update',
    method: 'post',
    data
  })
}

export function delUser(id) {
  return request({
    url: `/user/del?id=${id}`,
    method: 'get'
  })
}

export function getAllUser() {
  return request({
    url: `/user/list`,
    method: 'get'
  })
}
